package com.ynu.yx.chatroleai.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("ai_characters") // 具体的角色表
public class AICharacter {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField(value = "ai_id")
    private Long aiId;  //  AI角色ID

    @TableField(value = "category_id")
    private Long categoryId;  //  角色所属类别ID

    @TableField(value = "name")
    private String name; //  角色名称

    @TableField(value = "description")
    private String description; //  角色描述

    @TableField(value = "avatar_url")
    private String avatarUrl;  //   角色头像图片的网络地址

    // 定义系统提示字段
    @TableField(value = "system_prompt")
    private String systemPrompt;

    // 定义语音风格字段
    @TableField(value = "voice_style")
    private String voiceStyle;

    // 定义文本转语音的语音ID字段
    @TableField(value = "tts_voice_id")
    private String ttsVoiceId;

    // 定义流行度字段
    @TableField(value = "popularity")
    private Integer popularity;

    // 是否在使用
    @TableField(value = "is_active")
    private Boolean isActive;

    // 定义创建时间字段
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    // 定义创建时间字段
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    // 定义逻辑删除字段
    @TableLogic
    @TableField(value = "is_deleted")
    private Integer isDeleted;


    // 非数据库字段
    @TableField(exist = false)
    private List<String> categories;

    @TableField(exist = false)
    private List<String> skills;

    @TableField(exist = false)
    private List<Conversation> conversations;
}